//
//  GRMonthBillTableViewCell.m
//  YC_GRice
//
//  Created by luojinrong11 on 2018/7/27.
//  Copyright © 2018年 YeCai. All rights reserved.
//

#import "GRMonthBillTableViewCell.h"

@implementation GRMonthBillTableViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}
-(void)setBillModel:(GRAllBillModel *)billModel{
    _billModel = billModel;
    self.titleLabel.textColor = HEXCOLOR(0x222222);
    self.priceLabel.textColor = HEXCOLOR(0x222222);
    self.OverdueBt.hidden = YES;
    if (self.monthCellType ==  monthBillCelltypePrice) {
         self.titleLabel.text = @"账单金额";
        self.priceLabel.text = [NSString stringWithFormat:@"%.2lf",billModel.totalPrice];
        
    }else if(self.monthCellType == monthBillCelltypeOverdue){
        self.titleLabel.textColor = HEXCOLOR(0xE5004F);
        self.priceLabel.textColor = HEXCOLOR(0xE5004F);
        self.OverdueBt.hidden = NO;
        self.titleLabel.text = @"逾期金";
        self.priceLabel.text = [NSString stringWithFormat:@"%.2lf",billModel.overduePrice];
    }else{
        self.titleLabel.text = @"当前已还";
        self.priceLabel.text = [NSString stringWithFormat:@"%.2lf",billModel.begPrice];
    }
}

- (IBAction)showTipAction:(id)sender {
    
    [[LFAlertBox defaultAlert]showAlertTitle:@{ @"text":@"逾期金",@"textColor":HEXCOLOR(0x222222) ,@"font":     [UIFont boldSystemFontOfSize:18]} content:@{@"text":@"账单待还金额x0.3%(逾期利率)x逾期天数",@"textColor":HEXCOLOR(0x666666) ,@"font":     [UIFont systemFontOfSize:15] } cancleBtn:nil sureBtn:@{@"text":@"知道了",@"textColor":HEXCOLOR(0x02BB00) ,@"font":     [UIFont boldSystemFontOfSize:18] } completion:nil];
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
